package org.apache.commons.math.random;

import java.util.Random;

import junit.framework.TestCase;

public class testRandomDataImpl extends TestCase {
	RandomDataImpl randGenerator = new RandomDataImpl();
	Random generator = new Random();

	public void testNextExp() {
		double total = 0.0;
		for (int i = 0; i < 999999; i++) {
			total = total + randGenerator.nextExponential(1.0);
		}
		double meanValue = total / 1000000.0;
		System.out.println("the mean of exp is: " + meanValue);
	}

	public void testRandomUtility() {
		double total = 0.0;
		for (int i = 0; i < 999999; i++) {
			total = total + generator.nextDouble();
		}
		double meanValue = total / 1000000.0;
		System.out.println("the mean of uniform is: " + meanValue);
	}
}